<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

<ui:composition>
	<h:form id="editarConvenio">
		<p:messages autoUpdate="true" />
		<div class="row">
			<div class="col-lg-12">
				<p:outputLabel value="Nome" />
				<p:inputText styleClass="form-control"
					value="#{convenioBean.convenio.nomeConvenio}" maxlength="50" />
			</div>
		</div>
		<div class="row">
			<div class="col-lg-12">
				<p:outputLabel value="Valor Base" />
				<p:inputText styleClass="form-control" id="valorBase"
					value="#{convenioBean.convenio.valorBase}" maxlength="10">
					<f:convertNumber maxFractionDigits="2" currencySymbol="$"
						type="number" />
				</p:inputText>
			</div>
		</div>
		<div class="row">
			<div class="col-lg-12">
				<p:outputLabel value="Prazo Máximo para Retorno" />
				<p:inputText styleClass="form-control"
					value="#{convenioBean.convenio.prazoMaximoRetorno}" maxlength="3">
					<f:convertNumber integerOnly="true" />
				</p:inputText>
			</div>
		</div>
		<br />
		<div class="row">
			<div class="col-lg-12">
				<p:commandButton icon="ui-icon-circle-check"
					action="#{convenioBean.salvarConvenio()}"
					oncomplete="if (!args.validationFailed) PF('editarConvenioDialog').hide();"
					update=":listaConvenioForm"/>
				<p:commandButton icon="ui-icon-circle-close"
					onclick="PF('editarConvenioDialog').hide();">
					<p:confirm header="Cancelar Edicao"
						message="Deseja cancelar a edicao?" icon="ui-icon-alert" />
				</p:commandButton>
				<p:confirmDialog global="true">
					<p:commandButton value="Yes" type="button"
						styleClass="ui-confirmdialog-yes" icon="ui-icon-check" />
					<p:commandButton value="No" type="button"
						styleClass="ui-confirmdialog-no" icon="ui-icon-close" />
				</p:confirmDialog>
			</div>
		</div>
	</h:form>

</ui:composition>
</html>